package com.example.demo.controller;

import com.example.demo.dao.NoticeDao;
import com.example.demo.dao.WllxDao;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;
import java.util.Map;

@RestController
@CrossOrigin
public class WllxController {
    @Autowired
    WllxDao wllxDao;
    @PostMapping("/count_all_wllx")
    public long count_all_wllx(@RequestBody Map map){
        return wllxDao.count_all_wllx(map);
    }
    
    @PostMapping("/del_wllx")
    public int del_wllx(@RequestBody Map map){
        return wllxDao.del_wllx(map);
    }
    @PostMapping("/upd_wllx")
    public int upd_wllx(@RequestBody Map map){
        return wllxDao.upd_wllx(map);
    }
    @PostMapping("/add_wllx")
    public int add_wllx(@RequestBody Map map){
        return wllxDao.add_wllx(map);
    }

    @PostMapping("/find_all_wllx")
    public List<Map> find_all_wllx(@RequestBody Map map) throws InterruptedException {

        return wllxDao.find_all_wllx(map);
    }
}
